furny.entities
Class Furniture

java.lang.Object
  extended by furny.entities.Furniture

@Entity
public class Furniture
extends java.lang.Object

This class represents a furniture with the 3d model, metadata and a preview image. This is a value object that is mapped by hibernate to a relational database.

Since:
10.08.2012
Author:
Stephan Dreyer

Field Summary
private  java.util.Date date
           
private  long id
           
private  java.awt.image.BufferedImage image
           
private static java.util.logging.Logger LOGGER
           
private  MetaData metaData
           
private  com.jme3.scene.Node model
           
private  byte[] modelBytes
           
 
Constructor Summary
private Furniture()
          Private constructor.
  Furniture(java.lang.String name, com.jme3.scene.Node model)
          Constructor with name and the 3d model.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.Date getDate()
          Getter for the date of last change.
 long getId()
          Getter for the id.
 java.awt.image.BufferedImage getImage()
          Getter for the preview image.
private  byte[] getImageBytes()
          Private getter for the byte array of the preview image.
 MetaData getMetaData()
          Getter for the metadata of the furniture.
 com.jme3.scene.Node getModel()
          Getter for the 3d model as JME node.
private  byte[] getModelBytes()
          Private getter for the byte array of the model.
 java.lang.String getName()
          Getter for the name of the furniture.
 int hashCode()
           
 void setDate(java.util.Date date)
          Setter for the date of last change.
private  void setId(long id)
          Private setter for the id.
 void setImage(java.awt.image.BufferedImage image)
          Setter for the preview image.
private  void setImageBytes(byte[] bytes)
          Private setter for the byte array of the preview image.
private  void setMetaData(MetaData metaData)
          Setter for the metadata of the furniture.
 void setModel(com.jme3.scene.Node model)
          Setter for the 3d model as JME node.
private  void setModelBytes(byte[] bytes)
          Private setter for the byte array of the model.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LOGGER

private static final transient java.util.logging.Logger LOGGER

id

private long id

metaData

private MetaData metaData

date

private java.util.Date date

model

private com.jme3.scene.Node model

modelBytes

private byte[] modelBytes

image

private java.awt.image.BufferedImage image
Constructor Detail

Furniture

private Furniture()
Private constructor. Required by hibernate.

Since:
10.08.2012

Furniture

public Furniture(java.lang.String name,
                 com.jme3.scene.Node model)
Constructor with name and the 3d model.

Parameters:
name - The name of the furniture.
model - The 3d model.
Since:
10.08.2012
Method Detail

getId

public long getId()
Getter for the id.

Returns:
The id of the furniture.
Since:
10.08.2012

setId

private void setId(long id)
Private setter for the id. Required by hibernate.

Parameters:
id - The id of the furniture.
Since:
10.08.2012

getDate

public java.util.Date getDate()
Getter for the date of last change.

Returns:
Change date
Since:
10.08.2012

setDate

public void setDate(java.util.Date date)
Setter for the date of last change.

Parameters:
date - Change date
Since:
10.08.2012

getImageBytes

private byte[] getImageBytes()
Private getter for the byte array of the preview image. Required by hibernate.

Returns:
The image as byte array.
Since:
10.08.2012

setImageBytes

private void setImageBytes(byte[] bytes)
Private setter for the byte array of the preview image. Required by hibernate.

Parameters:
bytes - The image as byte array.
Since:
10.08.2012

getModelBytes

private byte[] getModelBytes()
Private getter for the byte array of the model. Required by hibernate.

Returns:
The model as byte array.
Since:
10.08.2012

setModelBytes

private void setModelBytes(byte[] bytes)
Private setter for the byte array of the model. Required by hibernate.

Parameters:
bytes - The model as byte array.
Since:
10.08.2012

getModel

public com.jme3.scene.Node getModel()
Getter for the 3d model as JME node.

Returns:
The 3d model.
Since:
10.08.2012

setModel

public void setModel(com.jme3.scene.Node model)
Setter for the 3d model as JME node.

Parameters:
model - The 3d model.
Since:
10.08.2012

getName

public java.lang.String getName()
Getter for the name of the furniture.

Returns:
The name
Since:
10.08.2012

getImage

public java.awt.image.BufferedImage getImage()
Getter for the preview image.

Returns:
Preview image
Since:
10.08.2012

setImage

public void setImage(java.awt.image.BufferedImage image)
Setter for the preview image.

Parameters:
image - Preview image
Since:
10.08.2012

getMetaData

public MetaData getMetaData()
Getter for the metadata of the furniture.

Returns:
Metadata
Since:
10.08.2012

setMetaData

private void setMetaData(MetaData metaData)
Setter for the metadata of the furniture.

Parameters:
metaData - The metadata
Since:
10.08.2012

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object